
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>

<%@page import="com.seabook.happy.website.pojos.BlogComment"%>
<%@ page import="com.seabook.happy.website.pojos.BlogArticle" %>
<%@ page import="com.seabook.happy.website.daos.BlogArticleDao" %>
<%@ page import="com.seabook.happy.website.utils.DateUtils" %>
<%@ page import="com.seabook.happy.website.web.vo.MenuNode" %>
<%@page import="com.google.appengine.api.datastore.KeyFactory" %>

	<%@ include file="blog_header_inc.jsp" %>

	<div id="blog_detail">
		<table>
	<tr><td>
	<% 
		BlogArticleDao dao = new BlogArticleDao();
		List<BlogArticle> articles = dao.listLatestBlogArticles(10);
		
		for (BlogArticle article : articles) {
			
	%>
	<article class="blog_sec">
			<time pubdate="" datetime="" ><%= DateUtils.parseDate(article.getCreatedDate(), "dd MMM, yyyy") %> </time>
			<h1>
				<a title="link to this post" rel="bookmark" href="showBlogArticle.jsp?id=<%= KeyFactory.keyToString(article.getKey()) %>"><%= article.getTitle() %></a>
			</h1>
			<p>
				<%= article.getContent().getValue() %>
			</p>
			Post by: Seabook at <%= DateUtils.parseDate(article.getCreatedDate(), "HH:MM dd/mm/yyyy") %>, last modified at <%=DateUtils.parseDate(article.getModifiedDate(), "HH:MM dd/mm/yyyy") %> 
	</article>
	<%
		}
	%>
	
	</td><td valign="top" align="left">
	

<center><!-- hitarek.com --><embed width="163" src="http://www.hitarek.com/clock/calendar-clock18.swf?TimeZone=IST&Place=&" height="185"  type="application/x-shockwave-flash"></embed></center>
  
	<div id="archive">
	<ul id='root1'  class='menu'>
    <%=(MenuNode.getDummyMenu().toHtml())%>
    </ul>
    </div>
  
    </td></tr></table>
	</div>
	<footer> 
		<a href="/composeBlogArticle.jsp">Compose</a>
	</footer>
	
	<%@ include file="footer_inc.jsp" %>
	</div><!-- end wrapper div -->
</body>
</html>